package com.yuedou.api.entity.product;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName(value = "product_order_info")
public class ProductOrderInfo implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商户ID
     */
    private Integer merId;

    private Long orderId;

    private Integer productId;

    private Integer skuId;

    private String skuName;

    private Integer count;

    private BigDecimal singlePrice;

    private BigDecimal originPrice;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    private Integer state;

    private BigDecimal totalMoney;

    //核销二维码
    private String qrCode;

    //二维码的创建时间  1分钟有效期
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date codeExpireTime;

    @TableField(exist = false)
    private String imgUrl;

    @TableField(exist = false)
    private String productName;

    @TableField(exist = false)
    private ProductAttrValue attrValue;

}
